<template>
  <div>
    <h1>上传文件</h1>
    <el-upload action="https://jsonplaceholder.typicode.com/posts/"
    :file-list="fileList" multiple :data="info" name="aaa"
    drag>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
      <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
    </el-upload>
  </div>
</template>

<script>
  export default{
    name: "Uploads",
    data(){
      return {
        fileList: [
          {
            name: 'food.jpeg',
  url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
          },
          {
            name: 'food2.jpeg',
  url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
          },
        ],
        info: { id: "21"},
      }
    }

  }
</script>

<style>
</style>
